<template>
  <div>
    <edu-input :key="field" :value.sync="currentValue" :args="args" />
    <!--<div v-if="dataType == 1 || dataType == 2"><edu-input :key="field" :value.sync="currentValue" :args="args" /></div>-->
    <!--<div v-else>默认点击即完成</div>-->
  </div>
</template>

<script>
import EduInput from '@public/form/input';
export default {
  components: {
    EduInput
  },
  props: {
    value: {
      type: Number,
      default: 0
    },
    field: {
      type: String,
      required: true,
      default: ''
    },
    formDatas: {
      type: Object,
      required: true,
      default: () => {
        return {};
      }
    }
  },
  data() {
    return {
      currentValue: this.value,
      args: {
        slot: '分钟',
        css: {
          width: '196px'
        }
      }
    };
  },
  computed: {
    dataType() {
      return this.formDatas.course_data_type;
    }
  },
  watch: {
    currentValue(value) {
      this.$emit('update:value', value);
    },
    dataType(type) {
      this.currentValue = 0;
      // if (type == 1 || type == 2) {
      //   this.currentValue = 0;
      // } else {
      //   this.currentValue = 0;
      // }
    }
  }
};
</script>
